package com.itheima.多态.多条的好处_04;
//测试类
public class Demo {
    public static void main(String[] args) {
//创建饲养员对象
        AnimalOperator operator = new AnimalOperator();
//调用方法喂狗吃饭
        operator.useAnimal(new Dog());
//调用方法喂猫吃饭
        operator.useAnimal(new Cat());

        operator.useAnimal(new Pig());

    }


}
